//
//  ServiceViewController.m
//  AAIM
//
//  Created by 远的小布丁 on 2019/12/20.
//  Copyright © 2019 AAIM. All rights reserved.
//

#import "ServiceViewController.h"

@interface ServiceViewController ()
@property (nonatomic,strong)UIImageView * backgroundImg;
@property (nonatomic,strong)UILabel * phoneLbl;
@property (nonatomic,strong)UIImageView * contentImg;
@property (nonatomic,strong)UILabel * mailLbl;
@property (nonatomic,strong)UIImageView * titleImg;
@end

@implementation ServiceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.gk_navTitle = @"客服中心";
    [self.view addSubview:self.backgroundImg];
    [self.view addSubview:self.contentImg];
    [self.view addSubview:self.phoneLbl];
    [self.view addSubview:self.mailLbl];

    [self setMasonry];
}

- (void)setMasonry{
    [_backgroundImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.gk_navigationBar.mas_bottom);
        make.left.equalTo(self.view.mas_left);
        make.right.equalTo(self.view.mas_right);
        make.bottom.equalTo(self.view.mas_bottom);
    }];
    
    [_contentImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.gk_navigationBar.mas_bottom).offset(291.f+kTopHeight);
        make.size.mas_equalTo(CGSizeMake(327.f, 249.f));
        make.centerX.equalTo(self.backgroundImg.mas_centerX);
    }];
    
    [_phoneLbl mas_makeConstraints:^(MASConstraintMaker *make) {
       make.top.equalTo(self.contentImg.mas_top).offset(111.f);
        make.left.equalTo(self.contentImg.mas_left).offset(37.f);
        make.right.equalTo(self.contentImg.mas_right).offset(25.f);
    }];
    [_mailLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.phoneLbl.mas_bottom).offset(28.f);
         make.left.equalTo(self.contentImg.mas_left).offset(37.f);
         make.right.equalTo(self.contentImg.mas_right).offset(25.f);
     }];
}

-(UIImageView *)backgroundImg{
    if (!_backgroundImg) {
        _backgroundImg = [[UIImageView alloc]init];
        _backgroundImg.image = [UIImage imageNamed:@"客服中心背景"];
    }
    return _backgroundImg;
}

- (UILabel *)phoneLbl{
    if (!_phoneLbl) {
        _phoneLbl = [[UILabel alloc]init];
        _phoneLbl.textColor = KHEXCOLOR(AllBackColor_titleColor);
        _phoneLbl.font = kMainFont(15.f);
        _phoneLbl.text = @"电话：18350135680";
    }
    return _phoneLbl;
}

-(UIImageView *)contentImg{
    if (!_contentImg) {
        _contentImg = [[UIImageView alloc]init];
        _contentImg.image = [UIImage imageNamed:@"框框"];
    }
    return _contentImg;
}

-(UILabel *)mailLbl{
    if (!_mailLbl) {
        _mailLbl = [[UILabel alloc]init];
        _mailLbl.textColor = KHEXCOLOR(AllBackColor_titleColor);
        _mailLbl.font = kMainFont(15.f);
        _mailLbl.text = @"邮箱：1425733787@qq.com";
    }
    return _mailLbl;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
